All Functions of Week 3

setwd

{base}

Set Working Directory

after_stat

{GGPLOT2}

Control aesthetic evaluation. On the module used for displying percent

sample

{base}

Takes a sample of the specified size

order

{base}

Get indexes that will sort a vector

ggplot

{GGPLOT2}

Create a ggplot graph

tabulate

{base}

Counts the number of times each integer occurs in an integer-only vector

rnorm

{base}

Generate random numbers from a normal distribution

grid.arrange

{gridExtra}

Places graphical objects into a rectangular grid

plot

{graphics}

Generic function from base R to produce a plot

unique

{base}

get unique elements

mean

{base}

Get mean of a vector

geom_density

{GGPLOT2}

Generates a density plot

library

{base}

Load an R package

theme_bw

{GGPLOT2}

A black and white ggplot theme

read.spss

{foreign}

Read a .sav file (SPSS data)

as.data.frame

{base}

Functions to check if an object is a data frame, or coerce it if possible.

round

{base}

Rounds numbers

get_mode

{rstatix}

Compute the mode in a given vector.

geom_histogram

{GGPLOT2}

Generates a histogram

c

{base}

Combine values/vectors into a vector

str

{utils}

Get the structure of an R object

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

xlab

{GGPLOT2}

Label the x axis (ggplot)

class

{base}

Retrieve class of an R object

seq

{base}

Create a sequence

runif

{stats}

Draws ranndom numbers from the uniform distribution

rbeta

{stats}

Beta Random Number Generating Function

set.seed

{base}

Initialise a pseudorandom number generator.

names

{base}

Retrieve names of a list/vector

hist

{graphics}

Plot a simple histogram

which.max

{base}

return index of the largest value in a vector

attach

{base}

Attach Set of R Objects to Search Path

ylab

{GGPLOT2}

Label the y axis (ggplot)

boxplot

{graphics}

Plot a simple box plot

matrix

{base}

Creates a matrix from the given set of values.

ggtitle

{GGPLOT2}

Generates a title for a ggplot graph

The end!